#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;
int main()
{
    int num, flag = 0;
    string Rps;
    cin >> num;
    cin >> Rps;
    while (Rps != "End")
    {
        if (flag == num)
        {
            flag = 0;
            cout << Rps << endl;
            cin >> Rps;
            continue;
        }
        if (Rps == "ChuiZi")
        {
            cout << "Bu" << endl;
        }
        else if (Rps == "JianDao")
        {
            cout << "ChuiZi" << endl;
        }
        else if (Rps == "Bu")
        {
            cout << "JianDao" << endl;
        }
        flag++;
        cin >> Rps;
    }
    return 0;
}

